package com.xiaoxi.exam.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

@Configuration
public class ThreadConfig {

    @Bean(name = "registExecutorService")
    public ExecutorService registExecutorService() {
        return Executors.newFixedThreadPool(2);
    }

    @Bean(name = "bookExecutorService")
    public ExecutorService bookExecutorService() {
        return Executors.newFixedThreadPool(5);
    }


}
